<template>
  <div>
    <nav-bar title="任务详情"></nav-bar>
    <div class="taskDetails maxinBox">
      <van-cell title="巡更人" :value="data.createUserName || '--'" />
      <van-cell title="巡检时间" :value="data.execStartTime | formatDate" />
      <van-cell class="marginTop5" title="整改人" :value="data.handlers | nickname" />
      <van-cell title="抄送人" :value="data.notifiers | nickname" />
    </div>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        data: this.$route.params.data
      }
    },
    filters: {
      nickname(val) {
        return val.map(item => {
          return `${item.userName} (${item.userMobile})`
        }).join(',') || '--'
      }
    }
  }
</script>
